package com.xnx3.wangmarket.plugin.offlineWeixinNotification.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 绑定关系
 * @author 管雷鸣
 *
 */
@Entity
@Table(name = "plugin_offlineweixinnotification", indexes={@Index(name="suoyin_index",columnList="kefuid,openid,userid")})
public class OfflineWeixinNotification implements java.io.Serializable{
	private Integer id;			//自动编号
	private Integer kefuid;		//该条所属哪个客服平台，对应 kefu.id
	private Integer userid;		//该条属于哪个用户，对应user.id
	private String chatid;		//用于发起聊天的chatid，也就是 kefu_zuoxi.id
	private String openid;		//对应的微信公众号openid
	private Integer addtime;	//添加时间
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "kefuid", columnDefinition="int(11) comment '该条常见问题所属哪个客服平台' ")
	public Integer getKefuid() {
		return kefuid;
	}
	public void setKefuid(Integer kefuid) {
		this.kefuid = kefuid;
	}
	
	@Column(name = "chatid", columnDefinition="char(50) comment '' ")
	public String getChatid() {
		return chatid;
	}
	public void setChatid(String chatid) {
		this.chatid = chatid;
	}
	@Column(name = "openid", columnDefinition="char(50) comment '' ")
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Column(name = "addtime", columnDefinition="int(11) comment '' ")
	public Integer getAddtime() {
		return addtime;
	}
	public void setAddtime(Integer addtime) {
		this.addtime = addtime;
	}
	public Integer getUserid() {
		return userid;
	}
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	
}
